<include file="Public:_head" />
<include file="Public:left" />

	<div id="neirong">
	  <!--<h2 class="lm_title">关联微信号 </h2>-->
             <h3 class="subTitle"><img src="com_statics/images/icon_10.gif" alt="图片描述" />关联微信号<span>关联微信号后，可大大提升您的招聘效率！</span></h3>
            <div id="GuanLian_weixin">
                <h3>关联微信号后，您可以：</h3>
                <ul>
                    <li>1. 在微信里面发布、修改、删除岗位信息；</li>
                    <li>2. 在微信里面下载、查看简历并预约求职者；</li>
                    <li>3. 在微信里面第一时间接收求职者投递的简历；</li>
                    <li>4. 在微信里面回复求职者的留言及咨询。</li>
                </ul>
            </div>
            <!-- GuanLian_weixin结束 -->
            <div id="GuanLian_erweima">
                <h4>如需绑定，请用微信扫一扫功能，<br />
                扫下面的二维码：</h4>
                <div class="erweima">
                	<img src="{$qrcode}" alt="图片描述" />
                </div>
            </div>
            <!-- GuanLian_erweima结束 -->
            <div id="GuanLian_name" style="display:none">
				<form name="wx_name_form" class="wxbind_form" method="post" action="{:U('Setting/save_wxbind')}">
                    <h3>扫描成功，请输出姓名</h3>
                    <div class="box">
                        姓名：<input name="wx_name" type="text" class="text wxbind_name" /><br/>
                        手机：<input name="wx_phone" type="text" class="text wxbind_phone" style="margin:10px 0px;"/><input name="bid" type="hidden" class="text bid" value="" /><br/> <button class="btn_send wxbind_submit"  type="button">绑定</button>
                    </div>
				</form>
            </div>
        	<!-- GuanLian_name结束 -->
            <div id="GuanLianUser">
                    <div class="resumeNr">
						<volist name="manage" id="m">
                        <div class="UserList">
							<div class="UserList_view">
								<strong>{$m.wx_name}</strong>
								<strong>{$m.wx_phone}</strong>
								<a href="javascript:void(0)" data-index="{$m.bid}" class="btn_esc wxbind_esc">取消关联</a>
								<a href="javascript:void(0)" data-index="{$m.bid}" class="btn_write wxbind_edit"></a>
							</div>
							<div class="UserList_edit" style="display:none">
								<form name="wx_name_form1" method="post" action="{:U('Setting/save_wxbind')}">
									<input name="wx_name" type="text" class="text wxbind_edit_input" value="{$m.wx_name}" />
									<input name="wx_phone" type="text" class="text wxbind_edit_input" value="{$m.wx_phone}" />
									<input name="bid" type="hidden" class="text bid" value="{$m.bid}" />
									<button href="javascript:void(0)" class="btn wxbind_doedit" type="button">提交修改</button>
								</form>
							</div>
							
                        </div>
						</volist>
                        <span class="clear"></span>
                   </div>     
                
            </div>
            <!-- GuanLianUser结束 -->
	</div>
	<!-- neirong结束 -->
	<span class="clear"></span>
	<!-- 清除浮动 -->
</div>
<script>
	$(document).ready(function(){
		$.extend({
			each_wxbind:function(code){
				$.post('__URL__/each_wxbind',{code:code},function(res){
					if(res.status){
						$(".bid").val(res.bid);
						$("#GuanLian_name").show();
						window.clearInterval(each);
					}
				},'json');
			}
		});
		$(".wxbind_esc").click(function(){
			if(confirm('取消绑定操作不可逆，是否确定？')){
				element = $(this);
				bid = element.attr('data-index');
				$.post('__URL__/del_wxbind',{bid:bid},function(res){
					alert(res.info);
					if(res.status){
						element.parent().remove();
						location.replace(location.href); 
					}
				});
			}else{
				return false;
			}
		});
		$(".wxbind_edit").click(function(){
			$(this).parent().hide();
			$(this).parent().parent().find(".UserList_edit").show();
		});
		$(".wxphone_edit").click(function(){
			$(this).parent().hide();
			$(this).parent().parent().find(".PhoneList_edit").show();
		});
		$(".wxbind_submit").click(function(){
			if($('.wxbind_name').val()==''){
				alert('请填写姓名');
			}else if($('.wxbind_phone').val()==''){
				alert('请填写手机号码');
			}else{
				$('.wxbind_form').submit();
			}
		});
		$(".wxbind_doedit").click(function(){
			if($(this).parent().find('input.wxbind_edit_input').val()==''){
				alert('请将修改项填写完整');
			}else{
				$(this).parent().submit();
			}
		});
		var each = setInterval("$.each_wxbind({$code})",2000);
	});
</script>
<!-- container结束 -->
<include file="Public:bottom" />